package com.example.cstvdemoone.fragments;

import com.example.cstvdemoone.R;
import com.example.cstvdemoone.adapters.CardsAnimationAdapter;
import com.example.cstvdemoone.adapters.FollowAdapter;
import com.haarman.listviewanimations.swinginadapters.AnimationAdapter;

import android.os.Bundle;
import android.support.v4.app.Fragment;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.ListView;

public class FollowFragment extends Fragment {
	private ListView mListView;
	private FollowAdapter adapter;
	@Override
	public View onCreateView(LayoutInflater inflater, ViewGroup container,
			Bundle savedInstanceState) {
		return inflater.inflate(R.layout.fragment_follow, container, false);
	}
	
	@Override
	public void onActivityCreated(Bundle savedInstanceState) {
		super.onActivityCreated(savedInstanceState);
		mListView = (ListView) getView().findViewById(R.id.mlistView);
		adapter = new FollowAdapter(getActivity());
		AnimationAdapter animationAdapter = new CardsAnimationAdapter(adapter);
		animationAdapter.setListView(mListView);
		mListView.setAdapter(animationAdapter);
	}
}
